<template>
  <div class="essay-correction">
    <el-form ref="essayForm" :model="essayForm" label-width="80px" class="essay-form">
      <el-form-item label="作文题目">
        <el-input v-model="essayForm.title" placeholder="请输入作文题目" style="width: 100%;"></el-input>
      </el-form-item>
      <el-form-item label="作文内容">
        <el-input type="textarea" :rows="20" v-model="essayForm.content" placeholder="请输入作文内容" style="width: 100%;"></el-input>
      </el-form-item>
      <el-form-item style="text-align: center;">
        <el-button type="primary" @click="submitEssayForm">提交批改</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import router from "@/router";

export default {
  data() {
    return {
      essayForm: {
        title: '',
        content: ''
      }
    };
  },
  methods: {
    submitEssayForm() {
      router.push('/index2');
      console.log('提交作文:', this.essayForm);
    }
  }
};
</script>

<style scoped>
.essay-correction {
  width: 100%;
  max-width: 800px;
  margin: 50px auto;
}

.essay-form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
</style>